
package com.google.code.lebar.bean.response.dialog;


import java.util.ArrayList;
import java.util.List;

import com.google.code.lebar.bean.response.action.Action;


public class ShownDialog implements Cloneable
{
    private String title;
    private String description;
    private String iconURL;
    private List<Action> actions;
    
    @Override
    public ShownDialog clone()
    {
        ShownDialog tClonedShownDialog = new ShownDialog();
        tClonedShownDialog.setTitle( getTitle() );
        tClonedShownDialog.setDescription( getDescription() );
        tClonedShownDialog.setIconURL( getIconURL() );
        tClonedShownDialog.setActions( cloneActions() );
        
        return tClonedShownDialog;
    }
    
    private List<Action> cloneActions()
    {
        if ( getActions() == null ) return null;

        List<Action> tClonedActions = new ArrayList<Action>();
        for ( Action tAction : getActions() )
        {
            tClonedActions.add( tAction.clone() );
        }

        return tClonedActions;
    }

    /**
     * @return the title
     */
    public String getTitle()
    {
        return title;
    }

    /**
     * @return the description
     */
    public String getDescription()
    {
        return description;
    }

    /**
     * @return the iconURL
     */
    public String getIconURL()
    {
        return iconURL;
    }

    /**
     * @return the actions
     */
    public List<Action> getActions()
    {
        return actions;
    }

    /**
     * @param title
     *            the title to set
     */
    public void setTitle( String title )
    {
        this.title = title;
    }

    /**
     * @param description
     *            the description to set
     */
    public void setDescription( String description )
    {
        this.description = description;
    }

    /**
     * @param iconURL
     *            the iconURL to set
     */
    public void setIconURL( String iconURL )
    {
        this.iconURL = iconURL;
    }

    /**
     * @param actions
     *            the actions to set
     */
    public void setActions( List<Action> actions )
    {
        this.actions = actions;
    }
}
